/** 判断是否登录
 * 
 */
export function DetermineWeatherToLogIn() {
	const app = getApp();
	const userInfo = app.userInfo;
	let isLogIn = false;
	console.log('userInfo:', userInfo);
	if ('name' in userInfo && '_id' in userInfo) {
		console.log('已经登录');
		isLogIn = true;
	} else {
		console.log('还未登录');
		isLogIn = false;
		// 如果没有登录的弹窗
		uni.showModal({
			content: '跳转登录',
			success: function(res) {
				if (res.confirm) {
					console.log('用户点击确定');
					uni.navigateTo({
						url: '/pages/personalPage/logIn/logIn',
					})
				} else if (res.cancel) {
					console.log('用户点击取消');
				}
			}
		});
	}

	return isLogIn;
}